#pragma once

#include "NotationParser.h"


namespace AppliedCryptography
{
	class HexParser : public NotationParser
	{
	private:
		bool _upperCase;

	public:
		HexParser() : _upperCase(false)
		{ /*...*/ };

	private:
		virtual byte EncodeChar(char) const;
		virtual std::string DecodeByte(byte) const;

	public:
		virtual std::vector<byte> Encode(std::string& input) const;
		virtual std::vector<byte> Encode(const char* input) const;
		virtual std::vector<byte> operator()(std::string& input) const;
		virtual std::vector<byte> operator()(const char* input) const;
		virtual std::string Decode(std::vector<byte>& input) const;
		virtual std::string operator()(std::vector<byte>& input) const;

	public:
		virtual bool IsUpperCaseMode() const;
		virtual void SetUpperCaseMode(bool);
	};
};
